#ifndef __MACRO_H__
#define __MACRO_H__

#define SAFE_DEL(p)						if(p){delete p; p = NULL;}
#define SAFE_DEL_ARRAY(pa)				if(pa){delete[] pa; pa = NULL;}
#define SAFE_DEL_ARRAY_POINTER(pap,n)	if(pap){for(int i=0; i<n; i++){if(pap[i]){delete pap[i]; pap[i] = NULL;}} pap = NULL;}

#endif